
import Table from './Table'
import tab from "./tab"
import checkbox from "./checkbox"
import pagination from "./pagination"
import select from "./select"
import FyMessage from "./message"
import input from "./input"
import Collapse from './Collapse'
import Pager from './Pager'
import Carousel from './Carousel'
import Tree from './Tree'
import treeDatas from './data'

import '../asset/iconfont/iconfont.css'
window.FyMessage = FyMessage;
// const pager = new Pager(document.querySelector('.pager'))
// console.log(pager.$container)


// new Table({
//   element: document.querySelector('.table'),

// })

new Collapse({
  element: document.querySelector('.collapse'),
  accordion: false,
  callback: ($item, key, keys) => {
    console.log($item, key, keys)
  }
})



new Carousel({
  element: document.querySelector('.carousel'),
  height: '200px',
  index: 1,
  interval: 3000,
  autoplay: true
})

new Tree({
  element: document.querySelector('.tree'),
  data: treeDatas,
  multiple: true,
  toggle: node => {
    console.log(node)
  },
  select: (nodes, node) => {
    console.log(nodes, node)
  }
})